import request from "../utils/request";

//文章列表/post
export const articleList = params => request({
    url: "/post",
    params
})

//发表文章/post
export const addArticle = data => request({
    url: "/post",
    method: "post",
    data
})

//文章详情/post/:id
export const articleDetail = id => request({
    url: "/post/" + id,
    method: "get"
})

//编辑文章/post_update/:id
export const post_update = (id, data) => request({
    url: "/post_update/" + id,
    method: "post",
    data
})